/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：LuoYingBinFen.java <br>
 * 创建时间：2013-8-23 下午8:09:39 <br>
 * 所属项目：GmudEX <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.battle.proc.stunt;

import lostland.gmud.exv2.Gmud;
import lostland.gmud.exv2.battle.BattleScreen;
import lostland.gmud.exv2.battle.ViewScreen;
import lostland.gmud.exv2.battle.proc.Status;
import lostland.gmud.exv2.battle.proc.StuntScreen;
import lostland.gmud.exv2.data.Npc;

/**
 * 类名：LuoYingBinFen <br>
 * 说明：25.飞龙探云手
 *
 * @author 12548
 */
public class FeiLongTanYun extends Status {


	/**
	 * @param zdp
	 * @param bdp
	 */
	public FeiLongTanYun(Npc zdp, Npc bdp) {
		super(zdp, bdp);
	}

	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.battle.proc.Status#execute()
	 */
	@Override
	public void execute() {

		boolean hit = Gmud.rand.nextBoolean();

		if (hit) {
			if (bdp.getDrug1() > 0) {
				new ViewScreen(BattleScreen.bsp(zdp, bdp, "$N偷取到了$n的金创药一支！")).pushToGame();
				bdp.setDrug1(bdp.getDrug1() - 1);
				zdp.give(8);
			} else {
				new ViewScreen(BattleScreen.bsp(zdp, bdp, "结果$N探了个空。")).pushToGame();
			}
		} else {
			if (bdp.getDrug2() > 0) {
				new ViewScreen(BattleScreen.bsp(zdp, bdp, "$N偷取到了$n的生肌膏一支！")).pushToGame();
				bdp.setDrug2(bdp.getDrug2() - 1);
				zdp.give(9);
			} else {
				new ViewScreen(BattleScreen.bsp(zdp, bdp, "结果$N探了个空。")).pushToGame();
			}
		}

		StuntScreen.StuntOver();

	}

}
